SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 47365: Columns are named incorrectly by the XLSX driver when GETNAMES=NO is specified in PROC IMPORT

DetailsAboutRate It

When you use the IMPORT procedure (PROC IMPORT) with the GETNAMES=NO option and the XLSX driver, the column names might be named incorrectly. For example:

proc import datafile='c:\sastest\myfile.xlsx' dbms=xlsx out=sasdata replace; sheet='myclass'; getnames=no; run; proc print data=sasdata; run;

When you print the table SASDATA, you see the following, where the column names are off by one letter. In some tables, column B should be column A, column C should be column B, and so on. In other cases, some columns headings are missing.

Obs   B      C   D  E  F
1    Alfred  M  14 69 112.5
2     Alice  F  13 56.5 84
3    Barbara F  13 65.3 98
4     Carol  F  14 62.8 102.5
5     Henry  M  14 63.5 102.5

To resolve the problem, do one of the following:

  • Install the first maintenance release of the SAS® 9.3 software (TS1M1) or a later release.
  • Rename the column names to their proper names.
  • Do not use the GETNAMES=NO option.


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to PC FilesLinux for x649.3 TS1M09.3 TS1M1
Solaris for x649.3 TS1M09.3 TS1M1
Linux9.3 TS1M09.3 TS1M1
Windows 7 Enterprise x649.3 TS1M09.3 TS1M1
Windows 7 Enterprise 32 bit9.3 TS1M09.3 TS1M1
Microsoft Windows XP Professional9.3 TS1M09.3 TS1M1
Microsoft Windows Server 2008 for x649.3 TS1M09.3 TS1M1
Microsoft Windows Server 20089.3 TS1M09.3 TS1M1
Microsoft Windows Server 2003 for x649.3 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Standard Edition9.3 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M09.3 TS1M1
HP-UX IPF9.3 TS1M09.3 TS1M1
64-bit Enabled Solaris9.3 TS1M09.3 TS1M1
64-bit Enabled HP-UX9.3 TS1M09.3 TS1M1
64-bit Enabled AIX9.3 TS1M09.3 TS1M1
Windows Vista for x649.3 TS1M09.3 TS1M1
Windows Vista9.3 TS1M09.3 TS1M1
Windows 7 Ultimate x649.3 TS1M09.3 TS1M1
Windows 7 Ultimate 32 bit9.3 TS1M09.3 TS1M1
Windows 7 Professional x649.3 TS1M09.3 TS1M1
Windows 7 Professional 32 bit9.3 TS1M09.3 TS1M1
Windows 7 Home Premium x649.3 TS1M09.3 TS1M1
Windows 7 Home Premium 32 bit9.3 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M09.3 TS1M1
Microsoft® Windows® for x649.3 TS1M09.3 TS1M1
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.